package com.geetour.columbus.region.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.geetour.columbus.common.exceptions.ServiceException;
import com.geetour.columbus.common.model.D.City;
import com.geetour.columbus.common.model.D.District;
import com.geetour.columbus.common.model.D.Province;
import com.geetour.columbus.common.service.IRegionDictService;
import com.geetour.columbus.region.bo.IRegionDictBO;


public class RegionDictServiceImpl implements IRegionDictService {

    private IRegionDictBO regionDictBOImpl;
    
    @Autowired
    public void setRegionDictBOImpl(IRegionDictBO regionDictBOImpl) {
        this.regionDictBOImpl = regionDictBOImpl;
    }

    @Override
    public List<Province> getAllProvinces() throws ServiceException {
        return regionDictBOImpl.getAllProvinces();
    }

    @Override
    public List<City> getCitysByProvinceId(Long id) throws ServiceException {
        return regionDictBOImpl.getCitysByProvinceId(id);
    }

    @Override
    public List<District> getDistrictsByCityId(Long id) throws ServiceException {
        return regionDictBOImpl.getDistrictsByCityId(id);
    }

}
